local sknvim_config = require 'sknvim_config'

local function stupid_mode_plugin(plugin)
    if sknvim_config.stupid_mode then
        return plugin
    end
end

local function sknvim_stupid_mode_selector(data, data1)
    if sknvim_config.stupid_mode then
        return data
    else
        return data1
    end
end

local function sknvim_normal_mode_data(data)
    if not sknvim_config.stupid_mode then
        return data
    end
end

local function highlight(group, fg, bg, options)
    if type(group) == "string" then
        vim.cmd.highlight({group, "guifg=" .. fg, "guibg=" .. bg, unpack(options)})
    elseif type(group) == "table" then
        for _, value in ipairs(group) do
            vim.cmd.highlight({value, "guifg=" .. fg, "guibg=" .. bg, unpack(options)})
        end
    end
end

return {
    stupid_mode_plugin = stupid_mode_plugin,
    stupid_mode_data_selector = sknvim_stupid_mode_selector,
    normal_mode_data = sknvim_normal_mode_data,
    highlight = highlight,
}
